package com.lifesea.notify.service;

import com.lifesea.dao.mybatis.NotifyTemplateMapper;
import com.lifesea.model.NotifyTemplate;
import com.lifesea.model.NotifyTemplateExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by iscdw on 2016/4/26.
 */
@Service
public class NotifyTemplateService {

    @Autowired
    private NotifyTemplateMapper notifyTemplateMapper;

    public NotifyTemplate get(String templateType) {
        NotifyTemplateExample example = new NotifyTemplateExample();
        example.createCriteria().andTemplateTypeEqualTo(templateType);
        return notifyTemplateMapper.selectByExample(example).get(0);
    }


}
